import { login, reqProtected, refreshToken } from "./api/index.js";

const btnLogin = document.querySelector('#btnLogin')
btnLogin.onclick = () => {
    login().then(() => {
        console.log('登录成功')
    })
}

const btnReqProtected = document.querySelector('#btnReqProject')
btnReqProtected.onclick = () => {
    reqProtected().then((res) => {
        console.log(res.data)
    })
}

const btnRefresh = document.querySelector('#btnRefresh')
btnRefresh.onclick = () => {
    refreshToken()
}